package com.qingxin.credit.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 信用评定
 * @author Administrator
 *
 */
@Entity
@Table(name="credit")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Credit extends com.qingxin.sys.entity.BaseEntity implements
java.io.Serializable {
	private static final long serialVersionUID = -5812067201760065952L;
	private String creditid;
	private String companyid; //被评定主体基本信息
	private String companyName;//被评定主体基本信息
	private String inspectDesc;//现场检查情况描述
	private String inspectAttachment;//现场检查情况附件
	private String evaluateBy;//评定人
	private String evaluateDesc;// 评定结果
	private String evaluateUnit;//评定单位名称
	private String evaluateLevel;//评定单位等级
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date evaluateTime;
	
	
	public Credit(String creditid, String companyid,String companyName,String inspectDesc,
			String inspectAttachment, String evaluateBy, String evaluateDesc,
			String evaluateUnit, String evaluateLevel, Date evaluateTime) {
		super();
		this.creditid = creditid;
		this.companyid = companyid;
		this.companyName =companyName;
		this.inspectDesc = inspectDesc;
		this.inspectAttachment = inspectAttachment;
		this.evaluateBy = evaluateBy;
		this.evaluateDesc = evaluateDesc;
		this.evaluateUnit = evaluateUnit;
		this.evaluateLevel = evaluateLevel;
		this.evaluateTime = evaluateTime;
	}
	
	public Credit() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "creditid", unique = true, nullable = false, length = 32)
	public String getCreditid() {
		return creditid;
	}
	public void setCreditid(String creditid) {
		this.creditid = creditid;
	}
	
	@Column(name="companyid" , length=32)
	public String getCompanyid() {
		return companyid;
	}
	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}
	
	@Column(name="companyname" , length=50)
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Column(name="inspect_desc")
	public String getInspectDesc() {
		return inspectDesc;
	}
	public void setInspectDesc(String inspectDesc) {
		this.inspectDesc = inspectDesc;
	}
	
	@Column(name="inspect_attachment",length=100)
	public String getInspectAttachment() {
		return inspectAttachment;
	}
	public void setInspectAttachment(String inspectAttachment) {
		this.inspectAttachment = inspectAttachment;
	}
	
	@Column(name="evaluate_by",length=20)
	public String getEvaluateBy() {
		return evaluateBy;
	}
	public void setEvaluateBy(String evaluateBy) {
		this.evaluateBy = evaluateBy;
	}
	
	@Column(name="evaluate_desc")
	public String getEvaluateDesc() {
		return evaluateDesc;
	}
	public void setEvaluateDesc(String evaluateDesc) {
		this.evaluateDesc = evaluateDesc;
	}
	
	@Column(name="evaluate_unit",length=50)
	public String getEvaluateUnit() {
		return evaluateUnit;
	}
	public void setEvaluateUnit(String evaluateUnit) {
		this.evaluateUnit = evaluateUnit;
	}
	
	@Column(name="evaluate_level",length=1)
	public String getEvaluateLevel() {
		return evaluateLevel;
	}
	public void setEvaluateLevel(String evaluateLevel) {
		this.evaluateLevel = evaluateLevel;
	}
	
	@Column(name="evaluate_time",length=23)
	public Date getEvaluateTime() {
		return evaluateTime;
	}
	public void setEvaluateTime(Date evaluateTime) {
		this.evaluateTime = evaluateTime;
	}
	
	
}
